# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libxfce4ui
pkgver=4.14.1
pkgrel=2
pkgdesc="Widgets library for the Xfce desktop environment"
url="https://xfce.org/"
arch="all"
license="GPL-2.0-only"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-gtk3"
depends_dev="startup-notification-dev"
makedepends="$depends_dev gtk+2.0-dev gtk+3.0-dev libxfce4util-dev xfconf-dev
	glade-dev gtk-doc gobject-introspection-dev"
source="https://archive.xfce.org/src/xfce/libxfce4ui/${pkgver%.*}/libxfce4ui-$pkgver.tar.bz2"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib \
		--localstatedir=/var \
		--enable-gladeui \
		--with-vendor-info="${DISTRO_NAME:-Alpine Linux}" \
		--disable-static \
		--enable-introspection \
		--enable-gtk-doc
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

gtk3() {
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libxfce4ui-2.so.* \
		"$pkgdir"/usr/lib/libxfce4kbd-private-3.so.* \
		"$subpkgdir"/usr/lib/
}

sha512sums="f42f41da3a683a0c56c3b1e7ba420c4f50909d2613e681d053b09b50bc0eb7f750f44c892e94b0ee8b9207983a87c0cadbda1ad93d0df74ae351dc8812025407  libxfce4ui-4.14.1.tar.bz2"
